echo '========================================'
echo '==============开始全量导入==============='
echo '========================================'

#日期字典表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true"  \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select * from calendar where 1=1 and  \$CONDITIONS"  \
--hcatalog-database bxg_ods \
--hcatalog-table calendar \
-m 1


#学校在读学生人数表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select * from class_studying_student_count where 1=1 and  \$CONDITIONS" \
--hcatalog-database bxg_ods \
--hcatalog-table class_studying_student_count \
-m 1


#班级课程表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2022-10-15' as dt from course_table_upload_detail where 1=1 and  \$CONDITIONS" \
--hcatalog-database bxg_ods \
--hcatalog-table course_table_upload_detail \
-m 1


#学生请假表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2022-10-15' as dt from student_leave_apply where 1=1 and  \$CONDITIONS" \
--hcatalog-database bxg_ods \
--hcatalog-table student_leave_apply \
-m 1


#学生签到表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select * from tbh_student_signin_record where 1=1 and  \$CONDITIONS" \
--hcatalog-database bxg_ods \
--hcatalog-table tbh_student_signin_record \
-m 1


#班级作息表
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2022-10-15' as dt from tbh_class_time_table where 1=1 and  \$CONDITIONS" \
--hcatalog-database bxg_ods \
--hcatalog-table tbh_class_time_table \
-m 1


echo '========================================'
echo '=================success==============='
echo '========================================'